﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal class XLNameUnicodeString
    {
        private XLUnicodeString _name;

        public void Read(BinaryReader reader)
        {
            this._name = new XLUnicodeString();
            _name.Read(reader);
        }

        public void Write(BinaryWriter writer)
        {
            _name.Write(writer);
        }
        public static explicit operator XLNameUnicodeString(string s)
        {
            return new XLNameUnicodeString() { _name = (XLUnicodeString) s };
        }
        public override string ToString()
        {
            return _name.ToString();
        }
        public static explicit operator string(XLNameUnicodeString s)
        {
            return (string) s._name;
        } 

    }
}